package com.youlu.campus.service.ad;

import com.youlu.campus.entity.UserPO;
import com.youlu.campus.entity.ad.UserDayAdsRecord;

import java.util.Date;

public interface UserDayAdsRecordService {

    UserDayAdsRecord create(UserDayAdsRecord req);

    boolean update(UserDayAdsRecord req);

    UserDayAdsRecord findById(String id);


    UserDayAdsRecord find(String userId, String taskId, Date dayTime, String platform, String appId);

    /**
     * 开始看广告
     *
     * @param userId
     * @param date
     * @return
     */
    UserDayAdsRecord startViewAd(String userId, String taskId, String adId, String platfrom, String appId, Date date);

    /**
     * 结束看广告
     *
     * @param id
     * @return
     */
    boolean endViewAd(UserPO userPO, String id);
}
